import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    name: 'Mes/dv',
    path: '/mes/dv',
    redirect: 'noRedirect',
    meta: {
      title: $t('mes.mesdv.title'),
      icon: 'lucide:book-open-text',
      noCache: false,
    },
    children: [
      {
        name: 'Machinerytype',
        path: 'machinerytype',
        component: () => import('#/views/mes/dv/machinerytype/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Machinerytype.title'),
          icon: 'mingcute:settings-6-line',
        },
      },
      {
        name: 'Machinery',
        path: 'machinery',
        component: () => import('#/views/mes/dv/machinery/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Machinery.title'),
          icon: 'ant-design:setting-filled',
        },
      },
      {
        name: 'Dvsubject',
        path: 'dvsubject',
        component: () => import('#/views/mes/dv/subject/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Dvsubject.title'),
          icon: 'ri:node-tree',
        },
      },
      {
        name: 'Checkplan',
        path: 'checkplan',
        component: () => import('#/views/mes/dv/checkplan/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Checkplan.title'),
          icon: 'jam:calendar-alt',
        },
      },
      {
        name: 'Checkrecord',
        path: 'Checkrecord',
        component: () => import('#/views/mes/dv/checkRecord/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Checkrecord.title'),
          icon: 'bx:file',
        },
      },
      {
        name: 'Repair',
        path: 'repair',
        component: () => import('#/views/mes/dv/repair/index.vue'),
        meta: {
          title: $t('mes.mesdv.children.Repair.title'),
          icon: 'iconoir:wrench',
        },
      },
    ],
  },
];

export default routes;
